#version 450

layout(location = 0) in vec3 p;
layout(location = 1) in vec3 vn;
layout(location = 2) in vec2 vt;

// set #0: global
struct CameraInput {
    mat4 proj;
    mat4 view;
    mat4 projview;
};
layout(set = 0, binding = 0) uniform GlobalInput {
    CameraInput camera;
} global;
// set #1: material


// set #2: object
layout(set = 2, binding = 0) uniform ObjectInput {
    mat4 trans;
} object;


void main() {
    gl_Position = global.camera.projview*object.trans*vec4(p, 1);
}